package br.com.hotel.dao;

import br.com.hotel.entity.Cliente;
import br.com.hotel.entity.Diaria;
import br.com.hotel.entity.Estadia;
import br.com.hotel.entity.Service;
import br.com.hotel.entity.TabelaPreco;

public class UtilsDAO {

	public static TabelaPreco getTabelaPreco(String toString) throws ClassNotFoundException{
		TabelaPrecoDAO tbpDAO = new TabelaPrecoDAO();
		return tbpDAO.findById(new Long(toString.substring(0, toString.indexOf("-"))));
	}
	public static Service getService(String toString) throws ClassNotFoundException{
		ServiceDAO sDAO = new ServiceDAO();
		return  sDAO.findById(new Long(toString.substring(0, toString.indexOf("-"))));
	}
	public static Estadia getEstadia(String toString) throws ClassNotFoundException{
		EstadiaDAO sDAO = new EstadiaDAO();
		return  sDAO.findById(new Long(toString.substring(0, toString.indexOf("-"))));
	}
	public static Cliente getCliente(String toString) throws ClassNotFoundException{
		ClienteDAO sDAO = new ClienteDAO();
		return  sDAO.findById(new Long(toString.substring(0, toString.indexOf("-"))));
	}
	public static Diaria getDiaria(String toString) throws ClassNotFoundException{
		DiariaDAO sDAO = new DiariaDAO();
		return  sDAO.findById(new Long(toString.substring(0, toString.indexOf("-"))));
	}
}
